<?php
namespace Core;

require_once __Dir__ . '/../../simpletest/autorun.php';

class TestOfUpdateUserInformations extends \UnitTestCase 
{
	/**
	* Test a correct update user informations
	*
	* @reference
	*
	* @requirement
	* @requirement
	*/
    function testCorrectUpdateInformationUser() 
	{
		$services = new CoreService();
		$result = $services->updateUserInformations(USER_TEST_ID, "Christopher", "Durant", "nothing", "cdurand@gmail.com", "06.48.30.54.23", "http://jetestlesite.com", "cdurant");
		
		$this->assertFalse($result->isFailed);
		$this->assertTrue(isset($result->response));
    }
	
	/**
	* Test an invalid update user informations by email already existing
	*
	* @reference
	*
	* @requirement
	* @requirement
	*/
    function testInvalidUpdateInformationUserUserNotFound() 
	{
		$services = new CoreService();
		$result = $services->updateUserInformations(-1, "Christopher", "Durant", "nothing", "cdurand@gmail.com", "06.48.30.54.23", "http://jetestlesite.com", "cdurant");
		
		$this->assertTrue($result->isFailed);
    }
}
?>